Conversation
Summary of ChangesHello @2yunseong, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 관리자가 시스템 내 모든 댓글의 공개 상태를 전역적으로 제어할 수 있는 기능을 추가합니다. 이를 통해 관리자는 필요에 따라 댓글 기능을 활성화하거나 비활성화할 수 있으며, 사용자 경험에 영향을 미치는 중요한 설정을 유연하게 관리할 수 있게 됩니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
| const { data, isLoading, isError } = useQuery( | ||
| QUERY_KEY, | ||
| getCommentsDisclosure | ||
| ); |
There was a problem hiding this comment.
TanStack Query v5 이상을 사용 중이라면 useQuery의 인자를 객체 형태({ queryKey, queryFn })로 전달해야 합니다. 현재의 방식은 v4 이하의 문법이므로, 프로젝트의 라이브러리 버전에 맞춰 최신 문법을 적용하는 것을 권장합니다.
| const { data, isLoading, isError } = useQuery( | |
| QUERY_KEY, | |
| getCommentsDisclosure | |
| ); | |
| const { data, isLoading, isError } = useQuery({ | |
| queryKey: QUERY_KEY, | |
| queryFn: getCommentsDisclosure, | |
| }); |
| const { mutate: updateDisclosure, isLoading: isUpdating } = useMutation( | ||
| postCommentsDisclosure, | ||
| { | ||
| onSuccess: () => { | ||
| queryClient.invalidateQueries({ queryKey: QUERY_KEY }); | ||
| }, | ||
| onError: () => { | ||
| alert("댓글 공개 상태 변경에 실패했습니다. 잠시 후 다시 시도해주세요."); | ||
| }, | ||
| } | ||
| ); |
There was a problem hiding this comment.
useMutation 또한 v5에서는 객체 형태의 인자를 사용하며, isLoading 속성은 isPending으로 변경되었습니다. 일관성 있는 최신 문법 사용을 권장합니다.
const { mutate: updateDisclosure, isLoading: isUpdating } = useMutation({
mutationFn: postCommentsDisclosure,
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: QUERY_KEY });
},
onError: () => {
alert("댓글 공개 상태 변경에 실패했습니다. 잠시 후 다시 시도해주세요.");
},
});
| export const postCommentsDisclosure = async (isDisclosure: boolean) => { | ||
| const { data } = await https.post<boolean | string>( | ||
| `/comments/disclosure`, | ||
| `${isDisclosure}` |

관련 이슈
작업 분류
PR을 통해 해결하려는 문제가 무엇인가요? 🚀
간단히 API 연동하였습니다! 추후 코드 개선이 필요합니다 :(
PR에서 핵심적으로 변경된 부분이 어떤 부분인가요? 👀
핵심 변경사항 이외 추가적으로 변경된 사항이 있나요? ➕
추가적으로, 리뷰어가 리뷰하며 알아야 할 정보가 있나요? 🙌
이런 부분을 신경써서 봐주셨으면 좋겠어요. 🙋🏻♂️
체크리스트 ✅
reviewers설정assignees설정label설정